<?php
namespace App\Modules\Qrcode;
use App\Modules\AdapterApi;
use App\Services\Qrcode\QrcodeIndex;
/**
 * Created by PhpStorm.
 * User: 97606
 * Date: 2018/6/12
 * Time: 10:10
 */
class Qrcode extends AdapterApi
{
    //生成二维码 可设置大小
    public function createQrCode()
    {
        $data = pick_array($this->postData, ['token','appkey','type','code_id','url','size']);
        return QrcodeIndex::Qrcode()->createQrCode($data);
    }

    //获取二维码
    public function gainQrCode()
    {
        $data = pick_array($this->postData, ['token','appkey','type','code_id']);
        return QrcodeIndex::Qrcode()->gainQrCode($data);

       /* $data = $this->haveIssetReceiveData(["token"=>" ", "appkey"=>" ", "type"=>" ", "code_id"=>" "]);
        return $this->oneStepRun($data,'serverqrcode/qrcode/ApiQrCode/gainQrCode','gainQrCode');*/
    }

}